Home

Operator Usage

Name

string-replace

Description

string-replace(source-sp, dest-ket) input-seq
For all kets in source-sp, replace with dest-ket in input-seq


Examples

string-replace(|sad>, |happy>) (|a> . |sad> . |fellow>)
    |a> . |happy> . |fellow>


-- remove " chars operator:
remove-quotes (*) #=> string-replace(|">, |>) |__self>

-- now put it to use:
remove-quotes |text: "some text">
    |text: some text>


-- remove punctuation chars:
-- :;.,!?$-"'
remove-punctuation (*) #=> string-replace(split |:;.,!?$-"'>, |>) |__self>

-- now put it to use:
remove-punctuation |some !$??..,:"text>
    |some text>


See also

char-replace

Operator type

function 2